package com.uduemc.biso.core.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.uduemc.biso.core.extities.center.HostSetup;
import com.uduemc.biso.core.feign.fallback.HostSetupFeignFallback;
import com.uduemc.biso.core.utils.RestResult;

@FeignClient(value = "BISO-BASIC-SERVICE", fallback = HostSetupFeignFallback.class)
@RequestMapping(value = "/host-setup")
public interface HostSetupFeign {

	@GetMapping(value = { "/find-by-host-id/{hostId}" })
	RestResult findInfoByHostId(@PathVariable("hostId") Long hostId);

	// 插入数据
	@PostMapping(value = { "/insert" })
	RestResult insert(HostSetup hostSetup);

	// 插入数据
	@PostMapping(value = { "/find-one/{id}" })
	RestResult findOne(@PathVariable("id") Long id);
}
